Skip to content

feat: add support of ydotool alongside with wtype - #1821

Open
zeerayne wants to merge 6 commits into
HyDE-Project:devfrom
zeerayne:ydotool
Open

feat: add support of ydotool alongside with wtype#1821
zeerayne wants to merge 6 commits into
HyDE-Project:devfrom
zeerayne:ydotool

Conversation

@zeerayne

@zeerayne zeerayne commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

This PR add feature to use ydotool when wtype is not present in the system. It can be helpful for multi-layout keyboard users because wtype breaks waybar indication of selected language.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

@kRHYME7 I'm a little bit confused about adding changelog entry: should I create smth like ## v26.x.x | Future Release in the head of the CHANGELOG.md?

Summary by CodeRabbit

  • Bug Fixes
    • Improved auto-paste by preferring ydotool when available and falling back to wtype.
    • Added an early exit when no supported paste utility is installed.
    • Preserved ignore rules across both paste methods.
  • Documentation
    • Updated the changelog with the new paste-tool preference.
  • Chores
    • Added ydotool to the required package list and documented optional paste-tool entries.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

paste_string now selects ydotool or wtype at runtime, exits when neither is installed, and passes the selected command through the existing Hyprland dispatch and ignore logic. Package configuration and release notes document the paste tools.

Changes

Paste backend selection

Layer / File(s) Summary
Backend selection and dispatch
Configs/.local/lib/hyde/globalcontrol.sh
paste_string selects an available paste tool, preserves TTY and ignore checks, and dispatches the selected command instead of hardcoding wtype.
Optional tool documentation and packaging
CHANGELOG.md, Scripts/dots/deps.toml, Scripts/pkg_extra.lst
The changelog records the backend preference. ydotool is added to pacman dependencies. ydotool and wtype are listed as commented optional packages.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: krhyme7

Poem

I’m a rabbit with a paste-ready nose,
ydotool hops where the clipboard flows.
If wtype waits in the burrow below,
The command still leaps when asked to show.
No tool? I quietly wiggle my toes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding ydotool support as an alternative to wtype for clipboard auto-pasting.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rubiin
rubiin requested a review from kRHYME7 July 25, 2026 15:51
@kRHYME7

kRHYME7 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@kRHYME7 I'm a little bit confused about adding changelog entry: should I create smth like ## v26.x.x | Future Release in the head of the CHANGELOG.md?

@zeerayne ## Unreleased would do

@zeerayne

Copy link
Copy Markdown
Contributor Author

@kRHYME7

  1. I have added changelog entry to Unreleased
  2. Changed logic a bit - now ydotool is preferred over wtype if both tools are available

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Line 69: Move the clipboard bullet about preferring ydotool over wtype from
the v26.7.4 section into ## Unreleased, creating or reusing its ### Changed
subsection as needed. Keep the existing wording and release sections otherwise
unchanged.

In `@Configs/.local/lib/hyde/globalcontrol.sh`:
- Around line 376-383: Update the paste-command selection around the ydotool
branch to verify that a usable ydotoold backend is available before choosing
ydotool. If ydotoold is unavailable or unconfigured, continue to the existing
wtype fallback; preserve the current ydotool and no-backend behavior when its
backend is usable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 669074ca-ebdc-40fe-9f13-610aef5ab556

📥 Commits

Reviewing files that changed from the base of the PR and between c752754 and d1e0dfd.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • Configs/.local/lib/hyde/globalcontrol.sh
  • Scripts/dots/deps.toml
  • Scripts/pkg_extra.lst

Comment thread CHANGELOG.md Outdated
Comment thread Configs/.local/lib/hyde/globalcontrol.sh
@zeerayne
zeerayne marked this pull request as draft August 1, 2026 06:41
@kRHYME7

kRHYME7 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

BTW can you contrast the diff of wtype and ydotool?

in the past ydotool was buggy and requires a service while wtype just works.

Any pros and cons between them?. ( aside from the OR desc )

@zeerayne

zeerayne commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

BTW can you contrast the diff of wtype and ydotool?

in the past ydotool was buggy and requires a service while wtype just works.

Any pros and cons between them?. ( aside from the OR desc )

Ydotool pros

  • It does not break waybar language indicator. I assune wtype break it by creating a virtual keyboard when pasting, but I did not investigate futher.

Ydotool cons

  • Systemd service required
  • More complex syntax

@zeerayne
zeerayne marked this pull request as ready for review August 2, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants